In many computer systems, a graphics processing unit is provided as a coprocessor to a central processing unit. The graphics processing unit is specially designed to handle certain kinds of operations efficiently, particularly manipulation of image data and data describing three-dimensional structures. Computer programs running on such computer systems are written to take advantage of the graphics processing unit by specifying operations to be performed by the graphics processing unit and the resources, such as image data, textures and other data structures or data, to be used in those operations.
Operations are generally implemented as computer programs, typically called “shaders”, in a language recognized by the graphics processing unit, typically called a “shader language” such as the high-level shading language (“HLSL”) or the OpenGL shading language (“GLSL”). The act of instructing the graphics processing unit what resource a shader uses is called “binding” the resource to that shader. An application programming interface for the computer system generally provides a layer of abstraction through which computer programs access and configure the graphics processing unit.
Although the graphics processing unit executes the specified shaders using the resources bound to those shaders, the central processing unit configures the graphics processing unit by loading the shaders and resources into memory, and binding the resources to the shaders. Generally, such configuration is performed for each operation, i.e., shader, to be processed by the graphics processing unit just before the time that operation is requested to run. The resources used for binding (which are references to the underlying actual data) also are themselves objects that are created and deleted through the operating system, and are tracked when used to manage memory allocation and paging of the underlying resources to which they refer.
Thus, with computer programs that heavily use the graphics processing unit, such as video games, three-dimensional modeling and animation tools, image processing tools, virtual reality applications, scientific and other information visualization applications, flight simulation and the like, the central processing unit experiences significant performance overhead to simply configure the graphics processing unit.